<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('工程合同及补充协议列表')" />
    <link rel="stylesheet" type="text/css" href="../../../../../../..//css/Test.css" />
</head>
<body class="white-bg animated fadeInRight">
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<div class="proagr col-sm-12 col-xs-12 col-md-12" >
    <p style="margin-top: 10px">
        <nav class="nav" >
            <a href="#" class="nav-item " active-color="orange" id="detail">详情</a>
            <a href="#" class="nav-item" active-color="rebeccapurple" id="schedules">工地安全质量费用表</a>
            <a href="#" class="nav-item" active-color="rebeccapurple" id="contracts">项目合同</a>
            <a href="#" class="nav-item" active-color="rebeccapurple" id="proagr">工程合同及补充协议表</a>
            <span class="nav-indicator"></span>
        </nav>
    </p>
</div>
<div class="proagr col-sm-12 col-xs-12 col-md-12" style="margin-bottom: 20px;">
    <p style="margin-top: 10px">
        <nav class="nav">
            <a href="#" class="nav-item" active-color="green"  id="completeds">竣工资料</a>
            <a href="#" class="nav-item" active-color="blue"  id="impl">施工资料</a>
            <a href="#" class="nav-item" active-color="red" id="prolog">计划日志</a>
            <a href="#" class="nav-item" active-color="rebeccapurple" id="problue">工程文件</a>
            <a href="#" class="nav-item" active-color="rebeccapurple" id="payment">付款申请表</a>
            <span class="nav-indicator"></span>
        </nav>
    </p>
</div>
<div class="container-div">
    <div class="row">
        <form id="formId" th:object="${bId}">
        </form>
        <div class="col-sm-12 select-table table-striped" >
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('ruoyi:agr:edit')}]];
    var removeFlag = [[${@permission.hasPermi('ruoyi:agr:remove')}]];
    var prefix = ctx + "ruoyi/agr";
    var ids=[[*{bId}]];
    $(function() {
        var options = {
            url: prefix + "/listss",
            modalName: "工程合同及补充协议",
            queryParams:{
                idss:ids
            },
            columns: [
                {
                    field: 'pId',
                    title: 'ID',
                    visible: false
                },
                {
                    field: 'pFileName',
                    title: '文件名称'
                },
                {
                    field: 'pUploading',
                    title: '上传文件',
                    formatter: function(value, row, index) {
                        return '<a href="javascript:downloadFile(\''+row.pUploading+'\')">下载</a>';
                    }
                },
                {
                    field: 'pRemark',
                    title: '备注'
                },
                {
                    field: 'pTheHeir',
                    title: '上传人'
                },
                {
                    field: 'pTime',
                    title: '上传时间'
                },
                {
                    field: 'pMoney',
                    title: '金额'
                },
                {
                    field: 'pContractParty',
                    title: '合同方'
                },
            ]
        };
        $.table.init(options);
    });
    function downloadFile(pUploading) {
        window.location.href=ctx+"common/download/resource?resource="+pUploading;
    }
    var bId=[[*{bId}]];
    $("#detail").click(function () {
        location.href="/system/building/detail/"+bId
    })

    $("#completeds").click(function () {
        location.href="/ruoyi/completed/completeds/"+bId
    })

    $("#impl").click(function () {
        location.href="/ruoyi/impl/implss/"+bId
    })

    $("#prolog").click(function () {
        location.href="/ruoyi/log/logs/"+bId
    })

    $("#proagr").click(function () {
        location.href="/ruoyi/agr/agrs/"+bId
    })
    $("#problue").click(function () {
        location.href="/system/blueprint/blueprints/"+bId
    })
    $("#payment").click(function () {
        location.href="/ruoyi/payment/payments/"+bId
    })
    $("#schedules").click(function () {
        location.href="/ruoyi/schedule/schedules/"+bId
    })
    $("#contracts").click(function () {
        location.href="/ruoyi/contract/contracts/"+bId
    })
</script>
</body>
</html>